home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows Expert
/
Windows Expert.iso
/
windownt
/
perlnt.zip
/
t
/
op
/
glob.nt
< prev
next >
Wrap
Text File
|
1993-07-25
|
655b
|
30 lines
#!./perl
# $Header: glob.t,v 4.0 91/03/20 01:52:49 lwall Locked $
print "1..4\n";
@INC = ("..\..");
@ops = <op/*>;
$list = join(' ', sort @ops);
opendir(R, "op");
@files = grep(/^[^.].*$/, readdir(R));
closedir R;
@files = sort grep (tr/[A-Z]/[a-z]/ && 1, @files);
$otherway = "op/" . join(" op/", @files);
print $list eq $otherway ? "ok 1\n" : "not ok 1\n$list\n$otherway\n";
print $/ eq "\n" ? "ok 2\n" : "not ok 2\n";
while (<jskdfjskdfj* op/* jskdjfjkosvk*>) {
$not = "not " unless $_ eq shift @ops;
$not = "not at all " if $/ eq "\0";
}
print "${not}ok 3\n";
print $/ eq "\n" ? "ok 4\n" : "not ok 4\n";